package com.lej.dataservice.club.bean.overview

import com.jeremyliao.liveeventbus.core.LiveEvent
import com.lej.core.common.*

data class BattleInfo(
    val battle_id: Int,
    val expire_time: String,
    val left: BattleUserInfo,
    val right: BattleUserInfo,
    val tag_id: String,
    /**[BATTLE_ING],[BATTLE_LEFT_WIN],[BATTLE_RIGHT_WIN],[BATTLE_DOGFALL]*/
    val win_type: Int,//0未结束 1左胜 2右胜 3平局
    //下方两个字段在观众端结果页展示
    val my_offer_exp: String,//结束时,我的助力值
    val my_offer_rank: String,//结束时么,我的助力排名
    val tag_name: String//榜单名
) : LiveEvent

data class BattleUserInfo(
    val uid: String,
    val avatar: String,
    @VIPLevel
    val svip: Int,
    /**当前排名*/
    val index: Int,
    val nick: String,
    /**初始排名*/
    val snapshot_index: Int,
    val support: MutableList<Supporter>?,
    val top_support: MutableList<Supporter>?,
    var total_exp: String
) {
    fun rankOff() = index - snapshot_index
}


data class Supporter(
    var avatar: String,
    val exp: String,
    var nick: String,
    var uid: String,
    val total_exp: Int,//总助力过人气
    val exp_type: Int,//0免费人气 1付费人气
    /**[VIP0]*/
    @VIPLevel
    val svip: Int
)
